﻿using System.ComponentModel;
using BizControl.Resources;
using BizControl.Library.Attributes;

namespace BizControl.Library
{
  public class ObjectPriorityClass
  {
    public static ObjectPriorityClass Lowest = new ObjectPriorityClass(PropertiesNames.Lowest);
    public static ObjectPriorityClass VeryLow = new ObjectPriorityClass(PropertiesNames.VeryLow);
    public static ObjectPriorityClass Low = new ObjectPriorityClass(PropertiesNames.Low);
    public static ObjectPriorityClass Normal = new ObjectPriorityClass(PropertiesNames.Normal);
    public static ObjectPriorityClass AboveNormal = new ObjectPriorityClass(PropertiesNames.AboveNormal);
    public static ObjectPriorityClass High = new ObjectPriorityClass(PropertiesNames.High);
    public static ObjectPriorityClass VeryHigh = new ObjectPriorityClass(PropertiesNames.VeryHigh);
    public static ObjectPriorityClass Highest = new ObjectPriorityClass(PropertiesNames.Highest);

    public ObjectPriorityClass(string name)
    {
      Name = name;
    }

    public string Name { get; private set; }

    public override string ToString()
    {
      return Name;
    }
  }

  public enum ObjectPriority : int
  {
    [LocalizableDescription(@"Lowest", typeof(Resources.PropertiesNames))] Lowest = 0,
    [LocalizableDescription(@"VeryLow", typeof(Resources.PropertiesNames))] VeryLow = 1,
    [LocalizableDescription(@"Low", typeof(Resources.PropertiesNames))] Low = 2,
    [LocalizableDescription(@"Normal", typeof(Resources.PropertiesNames))] Normal = 3,
    [LocalizableDescription(@"AboveNormal", typeof(Resources.PropertiesNames))] AboveNormal = 4, 
    [LocalizableDescription(@"High", typeof(Resources.PropertiesNames))] High = 5,
    [LocalizableDescription(@"VeryHigh", typeof(Resources.PropertiesNames))] VeryHigh = 6,
    [LocalizableDescription(@"Highest", typeof(Resources.PropertiesNames))] Highest = 7
  }
}
